
<%@ page import="org.toonWatch.Category" %>
<html>
  <head>
  <resource:carousel />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'category.label', default: 'Category')}" />
  <title><g:message code="default.list.label" args="[entityName]" /></title>
</head>
<body>
  <div id="contentText">
    <h2><span>Product</span>Category</h2>
  </div>
  <div id="wrap90" style="border:none; padding-top:0px;">
    <g:each in="${categoryInstanceList}" status="i" var="categoryInstance">
      <g:if test="${categoryInstance.items.size()!=0}">
      <div id="greyacross">
      <h3><span><g:link action="showUI" id="${categoryInstance.id}">${fieldValue(bean: categoryInstance, field: "name")}</g:link> </span>(${categoryInstance.items.size()} items)</h3><br>
      </div>
      <div style="height:230px;">
      <richui:carousel direction="horizontal" carouselStyle="height: 200px; width: 100%;" itemsStyle="height: 200px; width: 835px;">
        <g:each in="${categoryInstance.items}" var="j">
          <richui:carouselItem><img src="<g:createLink controller='item' action='renderProductPhoto' id='${j.id}'></g:createLink>" alt="hello" style="max-height:180px"/><br><g:link controller="item" action="displayItem" id="${j.id}">${j?.encodeAsHTML()}</g:link></richui:carouselItem>
        </g:each>
      </richui:carousel>
      </div>
      </g:if>
    </g:each>
  </div>
</body>
</html>
